import request from '../utils/request'

const getList = () => {
  return request({
    url: '/salay/getPayrollList',
    method: 'GET',
    params: {
      companyId: '8b2b696cfdea4f65a839a46b43f86f2c'
    }
  })
}

const getToken = (data) => {
  return request({
    url: '/getToken',
    method: 'POST',
    data
  })
}

// 有问题
const delateItem = (data) => {
  return request({
    url: '/salay/deleteBySlipId',
    method: 'POST',
    data
  })
}

const getAddList = () => {
  return request({
    url: '/employee/queryEmployee',
    method: 'POST',
    data: {
      employeeIds: 'ids',
      limit: 10,
      page: 1
    }
  })
}

const importBuilding = (data) => {
  return request({
    url: '/salay/importExcel',
    method: 'post',
    data
  })
}

const exportBuilding = () => {
  return request({
    url: '/salay/importExcel',
    method: 'GET',
    responseType: 'blob'
  })
}

export {
  getList,
  delateItem,
  getToken,
  getAddList,
  importBuilding,
  exportBuilding
}
